﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class usercontrol_email_templates_ProductTracking : System.Web.UI.UserControl
{
    private string _orderNumber;
    public string OrderNumber
    {
        get
        {
            return _orderNumber;
        }
        set
        {
            _orderNumber = value;
        }
    }

    private string _trackingNumber;
    public string TrackingNumber
    {
        get
        {
            return _trackingNumber;
        }
        set
        {
            _trackingNumber = value;
        }
    }

    private string _customerName;
    public string CustomerName
    {
        get
        {
            return _customerName;
        }
        set
        {
            _customerName = value;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        //Page.DataBind();
    }

    protected override void Render(HtmlTextWriter writer)
    {
        // demo tracking number: 1ZX580110415686543
        string trackingLink = String.Format("http://wwwapps.ups.com/WebTracking/processInputRequest?sort_by=status&error_carried=true&tracknums_displayed=1&TypeOfInquiryNumber=T&loc=en-US&InquiryNumber1={0}&AgreeToTermsAndConditions=yes", TrackingNumber);
        litCustomerName.Text = CustomerName;
        litOrderNumber.Text = OrderNumber.ToString();
        lnkTracking.HRef = trackingLink;
        litTrackingLink.Text = trackingLink;
        base.Render(writer);
    }
}
